<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/boot/picoboot.h File Reference</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('picoboot_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">picoboot.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;assert.h&gt;</code><br />
<code>#include &quot;<a class="el" href="platform_8h_source.html">pico/platform.h</a>&quot;</code><br />
<code>#include &quot;picoboot_constants.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for picoboot.h:</div>
<div class="dyncontent">
<div class="center"><img src="picoboot_8h__incl.png" border="0" usemap="#ainclude_2boot_2picoboot_8h" alt=""/></div>
<map name="ainclude_2boot_2picoboot_8h" id="ainclude_2boot_2picoboot_8h">
<area shape="rect" title=" " alt="" coords="522,5,697,32"/>
<area shape="rect" title=" " alt="" coords="43,304,114,331"/>
<area shape="rect" title=" " alt="" coords="111,379,193,405"/>
<area shape="rect" href="assert_8h_source.html" title=" " alt="" coords="288,304,363,331"/>
<area shape="rect" href="platform_8h.html" title=" " alt="" coords="549,80,670,107"/>
<area shape="rect" href="picoboot__constants_8h_source.html" title=" " alt="" coords="1147,80,1307,107"/>
<area shape="rect" href="compiler_8h_source.html" title=" " alt="" coords="93,155,275,181"/>
<area shape="rect" href="sections_8h_source.html" title=" " alt="" coords="709,155,888,181"/>
<area shape="rect" href="panic_8h_source.html" title=" " alt="" coords="912,155,1072,181"/>
<area shape="rect" title=" " alt="" coords="299,155,509,181"/>
<area shape="rect" title=" " alt="" coords="534,155,685,181"/>
<area shape="rect" title=" " alt="" coords="243,229,434,256"/>
<area shape="rect" href="common_2pico__base__headers_2include_2pico_2types_8h_source.html" title=" " alt="" coords="117,229,219,256"/>
<area shape="rect" title=" " alt="" coords="189,304,264,331"/>
</map>
</div>
</div>
<p><a href="picoboot_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__reboot__cmd.html">picoboot_reboot_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__reboot2__cmd.html">picoboot_reboot2_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__address__only__cmd.html">picoboot_address_only_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__range__cmd.html">picoboot_range_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__exec2__cmd.html">picoboot_exec2_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__exclusive__cmd.html">picoboot_exclusive_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__otp__cmd.html">picoboot_otp_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpicoboot__get__info__cmd.html">picoboot_get_info_cmd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ae7348f809f69d17dafff369974ddcd33"><td class="memItemLeft" align="right" valign="top"><a id="ae7348f809f69d17dafff369974ddcd33" name="ae7348f809f69d17dafff369974ddcd33"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PICOBOOT_MAGIC</b>&#160;&#160;&#160;0x431fd10bu</td></tr>
<tr class="separator:ae7348f809f69d17dafff369974ddcd33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8183e3f7fb3cc2259dae14a7942d664d"><td class="memItemLeft" align="right" valign="top"><a id="a8183e3f7fb3cc2259dae14a7942d664d" name="a8183e3f7fb3cc2259dae14a7942d664d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PICOBOOT_IF_RESET</b>&#160;&#160;&#160;0x41</td></tr>
<tr class="separator:a8183e3f7fb3cc2259dae14a7942d664d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae36919013b6743316f94bf24340a5a23"><td class="memItemLeft" align="right" valign="top"><a id="ae36919013b6743316f94bf24340a5a23" name="ae36919013b6743316f94bf24340a5a23"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PICOBOOT_IF_CMD_STATUS</b>&#160;&#160;&#160;0x42</td></tr>
<tr class="separator:ae36919013b6743316f94bf24340a5a23"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a7be85df94e57fc1531520806170a9da4"><td class="memItemLeft" align="right" valign="top"><a id="a7be85df94e57fc1531520806170a9da4" name="a7be85df94e57fc1531520806170a9da4"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>picoboot_cmd_id</b> { <br />
&#160;&#160;<b>PC_EXCLUSIVE_ACCESS</b> = 0x1
, <b>PC_REBOOT</b> = 0x2
, <b>PC_FLASH_ERASE</b> = 0x3
, <b>PC_READ</b> = 0x84
, <br />
&#160;&#160;<b>PC_WRITE</b> = 0x5
, <b>PC_EXIT_XIP</b> = 0x6
, <b>PC_ENTER_CMD_XIP</b> = 0x7
, <b>PC_EXEC</b> = 0x8
, <br />
&#160;&#160;<b>PC_VECTORIZE_FLASH</b> = 0x9
, <b>PC_REBOOT2</b> = 0xa
, <b>PC_GET_INFO</b> = 0x8b
, <b>PC_OTP_READ</b> = 0x8c
, <br />
&#160;&#160;<b>PC_OTP_WRITE</b> = 0xd
<br />
 }</td></tr>
<tr class="separator:a7be85df94e57fc1531520806170a9da4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cb7e5f4b3925056daf93a3fc55f189f"><td class="memItemLeft" align="right" valign="top"><a id="a8cb7e5f4b3925056daf93a3fc55f189f" name="a8cb7e5f4b3925056daf93a3fc55f189f"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>picoboot_status</b> { <br />
&#160;&#160;<b>PICOBOOT_OK</b> = 0
, <b>PICOBOOT_UNKNOWN_CMD</b> = 1
, <b>PICOBOOT_INVALID_CMD_LENGTH</b> = 2
, <b>PICOBOOT_INVALID_TRANSFER_LENGTH</b> = 3
, <br />
&#160;&#160;<b>PICOBOOT_INVALID_ADDRESS</b> = 4
, <b>PICOBOOT_BAD_ALIGNMENT</b> = 5
, <b>PICOBOOT_INTERLEAVED_WRITE</b> = 6
, <b>PICOBOOT_REBOOTING</b> = 7
, <br />
&#160;&#160;<b>PICOBOOT_UNKNOWN_ERROR</b> = 8
, <b>PICOBOOT_INVALID_STATE</b> = 9
, <b>PICOBOOT_NOT_PERMITTED</b> = 10
, <b>PICOBOOT_INVALID_ARG</b> = 11
, <br />
&#160;&#160;<b>PICOBOOT_BUFFER_TOO_SMALL</b> = 12
, <b>PICOBOOT_PRECONDITION_NOT_MET</b> = 13
, <b>PICOBOOT_MODIFIED_DATA</b> = 14
, <b>PICOBOOT_INVALID_DATA</b> = 15
, <br />
&#160;&#160;<b>PICOBOOT_NOT_FOUND</b> = 16
, <b>PICOBOOT_UNSUPPORTED_MODIFICATION</b> = 17
<br />
 }</td></tr>
<tr class="separator:a8cb7e5f4b3925056daf93a3fc55f189f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a089aa49590ca8ca8ee50e260d396294f"><td class="memItemLeft" align="right" valign="top"><a id="a089aa49590ca8ca8ee50e260d396294f" name="a089aa49590ca8ca8ee50e260d396294f"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>picoboot_exclusive_type</b> { <b>NOT_EXCLUSIVE</b> = 0
, <b>EXCLUSIVE</b>
, <b>EXCLUSIVE_AND_EJECT</b>
 }</td></tr>
<tr class="separator:a089aa49590ca8ca8ee50e260d396294f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a53a02b321562de1288a42521cdd886bf"><td class="memItemLeft" align="right" valign="top"><a id="a53a02b321562de1288a42521cdd886bf" name="a53a02b321562de1288a42521cdd886bf"></a>
struct __packed&#160;</td><td class="memItemRight" valign="bottom"><b>__aligned</b> (4) picoboot_cmd</td></tr>
<tr class="separator:a53a02b321562de1288a42521cdd886bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>
